import React from "react";
import frame from '../../../style/frame.less';

import DialogTitle from './DialogTitle'
import DialogContent from './DialogContent'
import connect from "react-redux/es/connect/connect";
import * as Actoin from "../../services/action";
// import Add from "../../modules/task/Form4Add";

class Dialog extends React.Component {

    constructor(props) {
        super(props);
    }

    loadModuleMenu = () => {
        this.props.loadModuleMenu('dialogState', '')
    };

    render() {
        return (
            <div className={frame.dialog}>
                <div className={frame.closeDialogLayout}>
                    <div><span onClick={this.loadModuleMenu}>+</span></div>
                </div>
                <DialogTitle>{this.props.title}</DialogTitle>
                <DialogContent>
                    {this.props.content}
                </DialogContent>
            </div>
        )
    }
}

const mapStateToProps = (store) => {
    return {
        enabled: 0,
    }
};

export default connect(mapStateToProps, Actoin)(Dialog)
